import request from '@/utils/request'

// 查询商品规格属性列表
export function listGoods_spec(query) {
  return request({
    url: '/goods/goods_spec/list',
    method: 'get',
    params: query
  })
}

// 查询商品规格属性详细
export function getGoods_spec(id) {
  return request({
    url: '/goods/goods_spec/' + id,
    method: 'get'
  })
}

// 新增商品规格属性
export function addGoods_spec(data) {
  return request({
    url: '/goods/goods_spec',
    method: 'post',
    data: data
  })
}

//更新库存
export function updateInventory(data) {
  return request({
    url: '/goods/goods_spec/updateInventory',
    method: 'post',
    data: data
  })
}

// 修改商品规格属性
export function updateGoods_spec(data) {
  return request({
    url: '/goods/goods_spec',
    method: 'put',
    data: data
  })
}

// 删除商品规格属性
export function delGoods_spec(id) {
  return request({
    url: '/goods/goods_spec/' + id,
    method: 'delete'
  })
}
